<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>arrToString</title>
  <script>
      var a =  [3,4,1,2,6,5];
   
  
    console.log(a.sort());
   
  </script>
</head>
<body>
  
</body>
</html>